package com.heima.api.client;

import com.heima.api.client.fallback.PayClientFallback;
import com.heima.api.dto.PayOrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * @author gonghuaiguo
 */

@FeignClient(value = "pay-service",fallbackFactory = PayClientFallback.class)
public interface PayClient {

//    @PutMapping()
//    void cancelOrder(Long orderId);

    /**
     *  根据交易ID查询支付单
     * @param id 业务订单id
     * @return 返回支付信息
     */
    @GetMapping("/pay-orders/biz/{id}")
    PayOrderVO queryPayOrderByBizOrderNo(@PathVariable("id") Long id);
}
